home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 June
/
ccd0605.iso
/
Software
/
Freeware
/
Programare
/
highlight
/
highlight-W32GUI-2.2-10b-Setup.exe
/
{app}
/
src
/
rtfgenerator.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-10-21
|
2KB
|
83 lines
/***************************************************************************
rtfcode.h - description
-------------------
begin : Die Jul 9 2002
copyright : (C) 2002 by Andre Simon
email : andre.simon1@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef RTFGENERATOR_H
#define RTFGENERATOR_H
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include "codegenerator.h"
#include "charcodes.h"
#include "version.h"
namespace highlight {
/**
\brief This class generates RTF.
It contains information about the resulting document structure (document
header and footer), the colour system, white space handling and text
formatting attributes.
* @author Andre Simon
*/
class RtfGenerator : public highlight::CodeGenerator
{
public:
/** Constructor
\param colourTheme Name of Colour theme to use
*/
RtfGenerator( const string &colourTheme);
RtfGenerator();
~RtfGenerator();
/** prints document header
\param title Title of the document
*/
string getHeader(const string & title);
/** Prints document footer*/
string getFooter();
/** Prints document body*/
void printBody();
private:
/** \return escaped character*/
virtual string maskCharacter(unsigned char );
/**\return text formatting attributes in RTF format */
string formatStyleAttributes( const ElementStyle & col);
/** gibt RTF-"Tags" zurueck (Farbindex+bold+kursiv)*/
string getOpenTag(int styleNumber,const ElementStyle &);
string getCloseTag(const ElementStyle &);
string getMatchingOpenTag(unsigned int styleID);
string getMatchingCloseTag(unsigned int styleID);
};
}
#endif